<template>
  <div class="common-footer-bar" :class="{ collapse }">
    <slot />
  </div>
</template>

<script setup>
  import { useSettingsStore } from '@/store/modules/settings'

  const settingsStore = useSettingsStore()
  const { collapse } = storeToRefs(settingsStore)
</script>

<style lang="scss" scoped>
  .common-footer-bar {
    position: fixed;
    left: $base-left-menu-width;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    padding: 20px;
    z-index: 5;
    background: $base-color-white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);

    &.collapse {
      left: 0;
    }
  }
</style>
